<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
	<style type="text/css">
		.container-fluid{
			padding-left: 75px;
			background-color: rgb(238,239,241);
		}
        #bread{
            list-style-type: none;
            width: 100%;
            height: 80px;
            background-color: white;
        }
        #bread li{
            float: left;
        }
        #detail{
            width: 85%;
            height: 500px;
            background-color: white;
            margin: 50px auto;
            padding: 10px;

        }
        #detail h2{
            font-weight: bold;
            margin-left: 30px;
        }
        
        #detail ul{
            list-style-type: none;
            margin-left: 300px;
        }
        #detail ul li{
            margin-top: 10px;
        }
        #detail ul li label{
            font-size: 24px;
            font-weight: bold;
        }
        #detail ul li span{
            color: red;
            font-size: 25px;
            font-weight: bold;
            margin-left: 20px;
        }
        #detail ul li span div{
            width: 200px;
            height: 35px;
            background-color: rgb(255,68,102);
            float: right;
            margin-right: 450px;
            color: white;
            text-align: center;
            cursor: pointer; 

        }
	</style>
	<link rel="stylesheet" type="text/css" href="/exchange/Public/css/bootstrap.min.css">
	<script type="text/javascript" src='/exchange/Public/js/jquery-3.1.1.min.js'></script>
	<script type="text/javascript" src='/exchange/Public/js/bootstrap.min.js'></script>
</head>
<body style="background-color:rgb(238,239,241); ">
<!--头顶开始-->
<nav class="navbar navbar-default" role="navigation"> 
    <div class="container-fluid"> 
        <div class="navbar-header"> 
            <a class="navbar-brand" href="#">同城二手交易平台</a> 
        </div> 
    <ul class="nav navbar-nav navbar-right">
    <?php if(empty($user)): ?><li><a href="#"><span class="glyphicon glyphicon-log-in">&nbsp;</span>登录</a></li>
            <?php else: ?>
            <li><a href="#"><span class="glyphicon glyphicon-log-in">&nbsp;</span><?php echo ($user); ?></a></li><?php endif; ?>
    <?php if(empty($user)): ?><li>
            <a href="#"><span class="glyphicon glyphicon-user">&nbsp;</span>注册</a>
            </li>
            <?php else: ?>
           <li> <a href="#"><span class="glyphicon glyphicon-user">&nbsp;</span>注册</a></li><?php endif; ?>
        </ul> 
    </div> 
</nav>
<!--头顶结束-->
<!--面包屑导航-->
<ul id="bread">
    <li><img src="/exchange/Public/images/logo.png" style="width: 180px;height: 80px;cursor: pointer;" id="back"></li>
    <li style="font-size: 25px;height: 80px;margin-top: 35px;">></li>
    <li style="font-size: 25px;height: 80px;margin-top: 35px;">详情</li>
</ul>
<script type="text/javascript">
        $("#back").click(function(){
            window.location.href="http://localhost/exchange/";
        })
    </script>
<!--面包屑导航-->


<div id="detail">
<h2><?php echo ($data[0]['desc']); ?></h2>
<hr>
<ul>
    <li><label>价格:</label><span><?php echo ($data[0]['price']); ?></span></li>
    <li><label>地区:</label><span><?php echo ($data[0]['area']); ?></span></li>
    <li><label>详细地址:</label><span><?php echo ($data[0]['detail']); ?></span></li>
    <li><label>联系方式:</label>
    <?php if(empty($user)): ?><span><div id="phone">详情</div></span>
            <?php else: ?>
            <span><?php echo ($data[0]['contract']); ?></span><?php endif; ?>
    </li>
    <li><label>上传时间:</label><span><?php echo (date('y-m-d',$data[0]['createtime'])); ?></span></li>
    <li><label>用户名:</label><span><?php echo ($data[0]['user']); ?></span></li>
</ul>
    
</div>
</body>
</html>
<script type="text/javascript">
    $('#phone').hover(function(){
        $(this).css('background-color','rgb(226,39,84)');
    },function(){
       $(this).css('background-color',' rgb(255,68,102)');
    })
    $("#phone").click(function(){
        alert('请登录');
        window.location.href='http://localhost/exchange/';
    })
</script>